package com.literature.threeGroup.mapper;

import com.literature.threeGroup.pojo.Organ;
import com.literature.threeGroup.pojo.OrganExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
public interface OrganMapper {
    long countByExample(OrganExample example);

    int deleteByExample(OrganExample example);

    int deleteByPrimaryKey(String id);

    int insert(Organ record);

    int insertSelective(Organ record);

    List<Organ> selectByExample(OrganExample example);

    Organ selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Organ record, @Param("example") OrganExample example);

    int updateByExample(@Param("record") Organ record, @Param("example") OrganExample example);

    int updateByPrimaryKeySelective(Organ record);

    int updateByPrimaryKey(Organ record);

    /**
      * @name  机构tree
     * @Author VULCAN
     * @Date 2020/1/11 10:03
     */
    List<Organ> findorgantree();
    /**
      * @name  列表 + 模糊
     * @Author VULCAN
     * @Date 2020/1/22 13:18
     */
    List<Organ> findorgantreelikename(Organ organ);
    /**
      * @name  机构删除
     * @Author VULCAN
     * @Date 2020/1/23 12:45
     */
    void organdel(String id);
    /**
      * @name  机构修改
     * @Author VULCAN
     * @Date 2020/1/23 12:45
     */
    void organupdate(Organ organ);
    //获取单位名称
    String findOrganName(String id);
    /**
     * @name  organcount
     * @Author VULCAN
     * @Date 2020/1/11 10:01
     */
    List organcount();
}